import { defineConfig } from 'vite'
import { visualizer } from 'rollup-plugin-visualizer'
  

export default defineConfig({
  plugins: [ visualizer()],
  resolve: {
    alias: {
      '@': '/src/',
      qps: '/src/.qps/exports.ts',
    },
  },

  build: {
    assetsDir: '',
    minify: true,
     
    rollupOptions: {
      output: {
        entryFileNames: `index.js`,


        assetFileNames(chunkInfo) {
          if (chunkInfo.name?.includes('css')) {
           
            return `index.css`;
          }

          return chunkInfo.name || '';
        },
      },
    },
    cssCodeSplit: false,
  },
})
